package dome5;

public class Text {
    public static void main(String[] args) {

    }
    public static void main4(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);
        myArrayList.add(6);
        System.out.println(myArrayList.size());
        myArrayList.clear();
        myArrayList.display();
    }
    public static void main3(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);
        myArrayList.add(6);
        myArrayList.set(2,30);
        myArrayList.display();
        myArrayList.remove(4);
        System.out.println();
        myArrayList.display();
    }
    public static void main2(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        System.out.println(myArrayList.indexOf(5));
        System.out.println(myArrayList.get(5));
    }
    public static void main1(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();
        myArrayList.add(2,10);
        System.out.println();
        myArrayList.display();
        boolean ret = myArrayList.contains(5);
        System.out.println(ret);
    }
}
